package cn.chiship.bs.api.biz.pojo.dto;

import cn.chiship.sdk.core.base.constants.BaseTipConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author lj
 */
@ApiModel(description = "商品表单")
public class ProductProductDto {
    @ApiModelProperty(value = "所属分类",required = true)
    @NotNull(message = "所属分类" + BaseTipConstants.NOT_EMPTY)
    @Length(min = 10, max = 36, message = "所属分类" + BaseTipConstants.LENGTH_MIN_MAX)
    private String productCategoryId;

    @ApiModelProperty(value = "商品SN码",required = true)
    @NotNull(message = "商品SN码" + BaseTipConstants.NOT_EMPTY)
    @Length(min = 10, max = 10, message = "商品SN码" + BaseTipConstants.LENGTH_MIN_MAX)
    private String productSn;

    @ApiModelProperty(value = "商品名称",required = true)
    @NotNull(message = "商品名称" + BaseTipConstants.NOT_EMPTY)
    @Length(min = 2, max = 20, message = "商品名称" + BaseTipConstants.LENGTH_MIN_MAX)
    private String productName;

    @ApiModelProperty(value = "商品单位",required = true)
    @NotNull(message = "商品单位" + BaseTipConstants.NOT_EMPTY)
    @Length(min = 1, max = 5, message = "商品单位" + BaseTipConstants.LENGTH_MIN_MAX)
    private String productUnit;

    @ApiModelProperty(value = "库存",required = true)
    @NotNull(message = "库存" + BaseTipConstants.NOT_EMPTY)
    @Min(value = 1)
    private Long productInventoryNumber;


    @ApiModelProperty(value = "市场价",required = true)
    @NotNull(message = "市场价" + BaseTipConstants.NOT_EMPTY)
    @Min(value = 0)
    private BigDecimal productMarketPrice;

    @ApiModelProperty(value = "店铺价",required = true)
    @NotNull(message = "店铺价" + BaseTipConstants.NOT_EMPTY)
    @Min(value = 0)
    private BigDecimal productShopPrice;

    @ApiModelProperty(value = "商品图文详情")
    private String productLongDesc;

    @ApiModelProperty(value = "封面")
    @NotNull(message = "封面" + BaseTipConstants.NOT_EMPTY)
    @Length(min = 2)
    private String productImg;


    @ApiModelProperty(value = "排序")
    @NotNull(message = "排序" + BaseTipConstants.NOT_EMPTY)
    @Min(value = 1)
    private Long orders;

    public String getProductCategoryId() {
        return productCategoryId;
    }

    public void setProductCategoryId(String productCategoryId) {
        this.productCategoryId = productCategoryId;
    }

    public String getProductSn() {
        return productSn;
    }

    public void setProductSn(String productSn) {
        this.productSn = productSn;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductUnit() {
        return productUnit;
    }

    public void setProductUnit(String productUnit) {
        this.productUnit = productUnit;
    }

    public Long getProductInventoryNumber() {
        return productInventoryNumber;
    }

    public void setProductInventoryNumber(Long productInventoryNumber) {
        this.productInventoryNumber = productInventoryNumber;
    }

    public BigDecimal getProductMarketPrice() {
        return productMarketPrice;
    }

    public void setProductMarketPrice(BigDecimal productMarketPrice) {
        this.productMarketPrice = productMarketPrice;
    }

    public BigDecimal getProductShopPrice() {
        return productShopPrice;
    }

    public void setProductShopPrice(BigDecimal productShopPrice) {
        this.productShopPrice = productShopPrice;
    }

    public String getProductLongDesc() {
        return productLongDesc;
    }

    public void setProductLongDesc(String productLongDesc) {
        this.productLongDesc = productLongDesc;
    }

    public String getProductImg() {
        return productImg;
    }

    public void setProductImg(String productImg) {
        this.productImg = productImg;
    }

    public Long getOrders() {
        return orders;
    }

    public void setOrders(Long orders) {
        this.orders = orders;
    }
}
